STEP 1: Notice that we set up the scene for you. Let's start by asking how many dragons the user wants to defeat.

The int() command casts a string into an integer.

  • In , drag in Ask for Integer.
  • Change the variable name from guess to dragon_count.
  • Change the string inside the .ask() command to "How many dragons will I have to defeat?"

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)